package main

import (
	"fmt"
	"time"
)

func main() {
	today := Today()
	fmt.Println(today)
	lastWeek := today.Add(time.Duration(-168) * time.Hour)
	fmt.Println(lastWeek)

	strs := []string{"a"}
	strs = append(strs, "")
	fmt.Println(strs)
}

// Today 获取当天时间，到0点0分0秒
func Today() time.Time {
	now := time.Now()
	return time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local)
}
